<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" >
<head>
    <title>Insert title here</title>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <title>Hello, Bootstrap Table!</title>
    <!-- jQuery文件。务必在bootstrap.min.js 之前引入 -->
    <script th:src="@{/js/jquery-3.2.1.min.js}"></script>
<!--    <script src="http://code.jquery.com/jquery-3.2.1.min.js"></script>-->
    <!-- 最新 Bootstrap4 核心 CSS 文件 -->
    <link  th:href="@{/css/bootstrap.min.css}" rel="stylesheet">
    <!-- bootstrap.bundle.min.js 用于弹窗、提示、下拉菜单，包含了 popper.min.js -->
    <script	th:src="@{/js/bootstrap.bundle.min.js}"></script>
    <!-- 最新的 Bootstrap4 核心 JavaScript 文件 -->
    <script	th:src="@{/js/bootstrap.min.js}"></script>
    <!-- DaterangePicker -->
    <link rel="stylesheet" type="text/css" media="all" th:href="@{/daterangepicker/daterangepicker.css}" />
    <!-- 最新 Bootstrap4 核心 CSS 文件 -->
<!--    <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/4.4.1/css/bootstrap.min.css">-->
<!--    &lt;!&ndash; jQuery文件。务必在bootstrap.min.js 之前引入 &ndash;&gt;-->
<!--    <script src="https://cdn.staticfile.org/jquery/3.4.1/jquery.min.js"></script>-->
<!--    &lt;!&ndash; bootstrap.bundle.min.js 用于弹窗、提示、下拉菜单，包含了 popper.min.js &ndash;&gt;-->
<!--    <script src="https://cdn.staticfile.org/popper.js/1.16.0/umd/popper.min.js"></script>-->
<!--    &lt;!&ndash; 最新的 Bootstrap4 核心 JavaScript 文件 &ndash;&gt;-->
<!--    <script src="https://cdn.staticfile.org/twitter-bootstrap/4.4.1/js/bootstrap.min.js"></script>-->
    <script th:src="@{/js/functions.js}"></script>
<script type="text/javascript"  th:inline="javascript">
	$(document).ready(
			function(){
				$('#loginFormModal').modal();
			}
	);

</script>
    <style type="text/css">
        body{
            background: url(/springbootdemo/images/view.jpg) repeat;
        }
        #login-box {
            /*border:1px solid #F00;*/
            padding: 35px;
            border-radius:15px;
            background: #56666B;
            color: #fff;
        }
    </style>
</head>
<body>
<div class="container" id="top">
    <div class="row" style="margin-top: 280px; ">
        <div class="col-md-4"></div>
        <div class="col-md-4" id="login-box">
            <form class="form-horizontal" role="form" th:action="@{/login}" id="from1" method="post">
                <div class="form-group">
                    <label for="user_name" class="col-sm-3 control-label">用户名：</label>
                    <div class="col-sm-9">
                        <input type="text" class="form-control" id="user_name" placeholder="请输入用户名" name="user_name">
                    </div>
                </div>
                <div class="form-group">
                    <label for="lastname" class="col-sm-3 control-label">密&nbsp;&nbsp;&nbsp;码：</label>
                    <div class="col-sm-9">
                        <input type="password" class="form-control" id="password" placeholder="请输入密码" name="password">
                        <div class="text-danger" th:text="${login!='yes'?login:''}"></div>
                    </div>
                </div>
                <div class="form-group pull-left" style="margin-right: 15px;">
                    <div class="col-sm-offset-2 col-sm-10">
                        <button type="submit" class="btn btn-default btn-info">登录</button>
                    </div>

                </div>
                <div class="form-group pull-left" style="margin-right: 15px;">
                    <div class="col-sm-offset-2 col-sm-10">
                        <button onclick="registerMadel()" type="button" class="btn btn-default btn-info">注册</button>
                    </div>
                </div>
            </form>
        </div>
        <div class="col-md-4"></div>
    </div>
</div>
<div class="modal fade" id="register" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                    &times;
                </button>
                <h4 class="modal-title" id="myModalLabel">
                    用户注册
                </h4>
            </div>
            <div class="modal-body">
                <form id="bjy-form" class="form-inline" name="newUser" th:action="@{/admin/addUser}" method="post" onsubmit="return check()">
                    <table class="table">
                        <tbody>
                        <tr>
                            <td>用户名</td>
                            <td><input type="text" class="form-control" name="user_name" placeholder="请输入用户名"/></td>
                        </tr>
                        <tr>
                            <td>密码</td>
                            <td><input type="password" class="form-control" name="password" placeholder="请输入密码"/></td>
                        </tr>
                        <tr>
                            <td>确认密码</td>
                            <td><input type="password" class="form-control" name="password1" placeholder="请再次输入密码"/></td>
                        </tr>
                        <tr>
                            <td>昵称</td>
                            <td><input type="text" class="form-control" name="real_name" placeholder="请输昵称"/></td>
                        </tr>

                        <tr>
                            <td>性别</td>
                            <td>
                                <input type="radio" class="form-check-input" name="gender"
                                       value="1"  >
                                <label class="form-check-label" for="gender">男</label>

                                <input type="radio" class="form-check-input" name="gender"
                                       value="0" >
                                <label class="form-check-label" for="gender" >女</label>
                            </td>

                        </tr>
                        <tr>
                            <td>手机</td>
                            <td><input type="text" class="form-control" name="phone" placeholder="手机"/></td>
                        </tr>

                        <tr>
                            <td>邮箱</td>
                            <td><input type="text" class="form-control" name="email" placeholder="邮箱"/></td>
                        </tr>


                        <tr>
                            <td><input class="btn btn-default" type="submit" value="注册"/></td>
                            <td><input class="btn btn-default" type="reset" value="重置"/></td>
                        </tr>
                        </tbody>
                    </table>
                </form>

            </div>
        </div>
    </div>
</div>


<script>
    function registerMadel() {
        $("#register").modal("show");
    }

    </script>
</body>
</html>